<h1><%= @user.name.upcase %> Blog Preview</h1>
<%= link_to "new" ,:action=>:new %>
<%= link_to "logout",:controller=>:login,:action=>:logout %>
<% for article in @article do %>
    <h2><%= article.title %></h2><%=link_to "edit" ,:action=>:edit,:id=>article %>
    <p><%= article.content %></p>
    posted by <%= article.user.name %> ,views <%= article.views %>
    date:<%= article.created_at %>
     <hr>
<%end%>